﻿using System.Models;
using System.Models.Models;

namespace System.DataInitialization.ModelsData
{
    public class DepartmentRoleData
    {
        private MyDbContext db;
        DepartmentRole data;
        DepartmentRole data1;

        public DepartmentRoleData()
        {
            db = new MyDbContext();
            data = new DepartmentRole()
            {
                DepartmentRoleName = "超级管理员"
            };
            data1 = new DepartmentRole()
            {
                DepartmentRoleName = "普通住户"
            };
        }

        public void AddData()
        {
            db.DepartmentRoles.Add(data);
            db.DepartmentRoles.Add(data1);
            db.SaveChanges();
        }
    }
}
